﻿@using Online_Course.Web.Apps
@model Online_Course.Domain.Student
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>修改信息</title>
    <link href="@Url.Content("~/Content/Style/ViewPage.css")" rel="stylesheet" type="text/css" />
    <link href="/Content/Style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        //$(function () {
        //    $("#btnSave").click(function () {
        //        alert(123);

        //        $.get("/EditUser", function (response) {
        //                alert(response);
        //            });

        //    });})
        function getValue() {
            //if ($('#OrganizationInfo_ID').val() == 0) {
            //    alert("请选择组织机构！");
            //    return false;
            //}

            var s = "";
            $('input[name="ids"]:checked').each(function () {

                s = s + $(this).val() + ",";
            });
            $('#roleIDs').val(s);
            $('#statusValue').val($('input[name="radStatusIds"]:checked').val());

            if ($('#Major_ID').val() != "") {
                $('#dictionaryId').val($('#Major_ID').val());
            }
            else {
                $('#dictionaryId').val("0");
            }
            if ($('#ClassInfo_ID').val() != "") {
                $('#classInfoId').val($('#ClassInfo_ID').val());
            }
            else {
                $('#classInfoId').val("0");
            }
        }
    </script>
    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li><a href="#">学生管理</a></li>
            <li><a href="#">修改信息</a></li>
        </ul>
    </div>
    <div style="padding:8px;" id="staff">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)
            <p>
            </p>
            <fieldset>
                <legend style="font: bold 1em Arial, Helvetica, sans-serif; color: #00008B; background-color: #FFFFFF;">学生信息</legend>
                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Name)</li>
                        <li class="scinput">
                            @Html.EditorFor(model => model.Name)
                            @Html.ValidationMessageFor(model => model.Name)
                        </li>
                    </ul>
                </div>

                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Code)</li>
                        <li class="scinput">
                            @Html.TextBoxFor(model => model.Code)
                            @Html.ValidationMessageFor(model => model.Code)
                        </li>
                    </ul>
                </div>

                @*<div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Class)</li>
                        <li class="scinput">
                            @Html.TextBoxFor(model => model.Class)
                            @Html.ValidationMessageFor(model => model.Class)
                        </li>
                    </ul>
                </div>*@

                @*<div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Major)</li>
                        <li class="scinput">
                            @Html.TextBoxFor(model => model.Major)
                            @Html.ValidationMessageFor(model => model.Major)
                        </li>
                    </ul>
                </div>*@

                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.Phone)</li>
                        <li class="scinput">
                            @Html.TextBoxFor(model => model.Phone)
                            @Html.ValidationMessageFor(model => model.Phone)
                        </li>
                    </ul>
                </div>

                <div class="tools ">
                    <ul class="seachform">
                        <li>@Html.LabelFor(model => model.IsActive)</li>
                        <div style="float:left; ">
                            @Html.RadioButtonList("radStatusIds", ViewBag.Active as IList<SelectListItem>)
                            @Html.Hidden("statusValue")

                        </div>
                    </ul>
                </div>
                @*<div class="tools ">
                    <ul class="seachform">
                        <li> <label>专业</label></li>
                        <li>
                            <div>
                                @Html.DropDownListFor(model => model.Major.ID, new SelectList(ViewBag.dictionaryList, "ID", "Name"))
                                @Html.Hidden("dictionaryId")
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="tools ">
                    <ul class="seachform">
                        <li> <label>班级</label></li>
                        <li>
                            <div>
                                @Html.DropDownListFor(model => model.ClassInfo.ID, new SelectList(ViewBag.classList, "ID", "ClassName"))
                                @Html.Hidden("classInfoId")
                            </div>
                        </li>
                    </ul>
                </div>*@


                

            </fieldset>
            @Html.HiddenFor(model => model.ID)

            <p>
            </p>
            <div style="margin-top:10px;">
                <p>
                    <input type="submit" id="btnSave" value="保   存" class="scbtn" onclick="getValue()" />&nbsp;&nbsp;&nbsp;&nbsp;@Html.ActionLink("返回列表", "Index")
                </p>
            </div>
        }
    </div>
</body>
</html>
